package com.liss.juc20211122.jmm;

/**
 * 私有的静态内部类
 */
public class SingletonDemo {
    private SingletonDemo() {
    }
    public static SingletonDemo getInstance(){
        return SingletonDemoHolder.instance;
    }
    private static class SingletonDemoHolder{
        public static SingletonDemo instance = new SingletonDemo();
    }

}
